{extend name='app' /}
{block name='title'}角色组{/block}

{block name="stylesheet"}
<link href="{__ADMIN__}/css/plugins/jsTree/style.min.css" rel="stylesheet">
{/block}


{block name="breadcrumb"}
<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-lg-10">
        <h2>角色组</h2>
        <ol class="breadcrumb">
            <li class="breadcrumb-item">
                <a>权限管理</a>
            </li>
            <li class="breadcrumb-item active">
                <strong>角色组</strong>
            </li>
        </ol>
    </div>
</div>
{/block}


{block name="content"}
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox ">

                <div class="ibox-content">
                    <div class="row">
                        <div class="col-sm-12 m-b-sm">
                                <span class="float-left">
                                    <button class="btn btn-primary btn-sm" type="button"
                                            onclick="get_html($(this),'{$Think.config.admin.app_host}/admin/group/create')"><i
                                            class="fa fa-plus"></i>&nbsp;添加
                                    </button>
                                </span>
                            <span class="float-right btn-group">

                                </span>
                        </div>
                    </div>

                    <div class="table-responsive">
                        <table class="table table-bordered table-hover">
                            <thead>
                            <tr>
                                <th>#</th>
                                <th>角色组名</th>
                                <th>状态</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            {foreach $list as $index => $item}
                                <tr>
                                    <td>{++$index}</td>
                                    <td class="text-left">{$item->level_name|raw}</td>
                                    <td>
                                        {if $item->status == '1'}
                                        <span class="text-navy"><i class="fa fa-circle"></i>&nbsp;正常</span>
                                        {else/}
                                        <span class="text-danger"><i class="fa fa-circle"></i>&nbsp;冻结</span>
                                        {/if}
                                    </td>
                                    <td>
                                        {if $item->id <> 1}
                                            <button class="btn btn-info btn-xs" type="button" onclick="get_html($(this),'{$Think.config.admin.app_host}/admin/group/{$item->id}/edit')"><i class="fa fa-pencil"></i>&nbsp;编辑
                                            </button>
                                        {/if}
                                    </td>
                                </tr>
                            {/foreach}
                            </tbody>
                        </table>
                    </div>

                </div>
            </div>
        </div>

    </div>
</div>
{/block}

{block name="script"}
<script src="{__ADMIN__}/js/plugins/jsTree/jstree.js"></script>
{/block}
